﻿using System;
using System.ComponentModel.DataAnnotations;

namespace Sharp.Portal.Mvc.Form
{
    public class FieldItem
    {
        /// <summary>
        /// 名称
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 字段标题
        /// </summary>
        public string FieldLabel { get; set; }
        /// <summary>
        /// 主数据分类
        /// </summary>
        public string MasterDataCategory { get; set; }
        /// <summary>
        /// 排序
        /// </summary>
        public int Order { get; set; }
        /// <summary>
        /// 水印
        /// </summary>
        public string Prompt { get; set; }
        public string Description { get; set; }
        public DataType DataType { get; set; }
        public FieldType FieldType { get; set; }

        /// <summary>
        /// DropDownList 的ValueField
        /// </summary>
        public string ValueField { get; set; }
        /// <summary>
        /// DropDownList 的DisplayField
        /// </summary>
        public string DisplayField { get; set; }
        /// <summary>
        /// DropDownList 的DataSourceName
        /// </summary>
        public string DataSourceName { get; set; }
        public Type PropertyType { get; set; }
        /// <summary>
        /// 表单
        /// </summary>
        public SharpFrom ParentForm { get; set; }

        public object Model { get; set; }
        /// <summary>
        /// 隐藏表单的字段
        /// </summary>
        public bool HideField { get; set; }
    }
}